<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>面板</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, shrink-to-fit=no"/>
    <meta name="renderer" content="webkit"/>
    <meta name="force-rendering" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <link href="/static/public/libs/font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
    <link href="/static/public/libs/editormd/css/editormd.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="/static/admin/static/component/pear/css/pear.css" />
    <link href="/static/admin/static/css/main.css" rel="stylesheet"/>
    <link href="/static/admin/pages/article/css/article_create.css" rel="stylesheet"/>
    <link href="/static/public/libs/highlight/styles/atom-one-dark.css" rel="stylesheet">
</head>
<body class="pear-container">
<div class="p-container">
    <form class="layui-form" action="">
        <div class="layui-row layui-col-space10">
            <div class="layui-input-inline"  style="display: none;">
                <select lay-verify="" type="hidden"></select>
            </div>
            <div class="layui-col-xs12 layui-col-sm12 layui-col-md8" id="p-container-left">
                <div class="layui-card">
                    <div class="layui-card-body">
                        <input type="hidden" name="id" value="#(article.id)">
                        <div class="layui-form-item">
                            <span class="p-form-tip">标题:</span>
                            <input type="text" name="title" value="#(article.title)" required lay-verify="required"
                                   placeholder="请输入文章标题" autocomplete="off" class="layui-input">
                        </div>

                        <div class="layui-form-item" style="margin: 0">
                            <span class="p-form-tip">文章内容:</span>
                            <a href="javascript:;" class="switchEditor" onclick="switchEditor()"></a>
                        </div>
                        <input type="hidden" id="editorMode" name="editorMode" required lay-verify="required" autocomplete="off" class="layui-input" value="#(article.contentModel)">
                        <div id="editorBox">
                            <textarea id="articleContent" style="display: none">#(article.content)</textarea>
                            <div id="editor">

                            </div>
                        </div>

                    </div>
                </div>

            </div>
            <div class="layui-col-xs12 layui-col-sm12 layui-col-md4 p-container-right" id="p-container-right">
                <div class="layui-card">
                    <div class="layui-card-header p-article-header">
                        <div class="p-article-btn-box">
                            <button type="button" lay-submit lay-filter="publishForm"
                                    class="pear-btn pear-btn-md pear-btn-primary" id="publishBtn">
                                <i class="fa fa-paper-plane-o" aria-hidden="true"></i> 发布
                            </button>
                            <button type="button" lay-submit lay-filter="draftForm" class="pear-btn pear-btn-md" style="margin-left: 5px">
                                <i class="fa fa-folder-open-o" aria-hidden="true"></i> 保存到草稿箱
                            </button>
                        </div>
                        <div style="margin-left: auto;">
                            <a id="switch-panel-btn" title="收起右侧面板" href="javascript:;"><i class="layui-icon layui-icon-right"></i></a>
                        </div>
                    </div>
                    <div class="layui-card-body">
                        <div class="layui-form-item">
                            <span class="p-form-tip">访问地址别名:</span>
                            <input type="text" name="slug" id="slug" value="#(article.slug??)" onchange="updatePageUrl()" placeholder="请输入别名,为空则采用ID作为别名" autocomplete="off" class="layui-input">
                            <div style="color: #5e6062;">#(WEB_SITE)/page/<span id="pageUrl">#(article.slug??)</span></div>
                        </div>
                        <div class="layui-form-item">
                            <span class="p-form-tip">分类:</span>
                            <div id="category"></div>
                        </div>

                        <div class="layui-form-item">
                            <span class="p-form-tip">标签:</span>
                            <div id="tag"></div>
                        </div>

                        <div class="layui-form-item">
                            <span class="p-form-tip">文章摘要:</span>
                            <textarea name="summary" placeholder="请输入文章摘要" class="article-textarea layui-textarea"
                                      style="resize: none">#(article.summary)</textarea>
                        </div>

                        <div class="layui-form-item">
                            <span class="p-form-tip">SEO关键字:</span>
                            <input type="text" name="metaKeywords" placeholder="请输入SEO关键字" autocomplete="off"
                                   class="layui-input" value="#(article.metaKeywords)">
                        </div>

                        <div class="layui-form-item">
                            <span class="p-form-tip">SEO描述:</span>
                            <textarea name="metaDescription" placeholder="请输入SEO描述"
                                      class="layui-textarea article-textarea"
                                      style="resize: none">#(article.metaDescription)</textarea>
                        </div>

                        <div class="layui-form-item">
                            <span class="p-form-tip">文章标识:</span>
                            <input type="text" name="flag" placeholder="请输入文章标识" autocomplete="off" class="layui-input" value="#(article.flag)">
                        </div>

                        <div class="layui-form-item article-switch">
                            <span class="p-form-tip">允许评论:</span>
                            <input type="checkbox" name="isComment" lay-text="允许|不允许" lay-skin="switch"
                                   #(article.isComment == 1 ? 'checked': '')>

                            <span class="p-form-tip">置顶:</span>
                            <input type="checkbox" name="isTop" lay-text="置顶|不置顶" lay-skin="switch"
                                   #(article.isTop == 1 ? 'checked': '')>
                        </div>

                        <div class="layui-form-item">
                            <span class="p-form-tip">封面图:</span>
                            <div>
                                <div class="layui-input-inline" style="width: calc(100% - 70px);">
                                    <input type="text" placeholder="封面图" name="thumbnail" class="layui-input" value="#(article.thumbnail)">
                                </div>
                                <div class="layui-inline" style="left: -11px;">
                                    <div id="thumbnail" class="p-upload-input-box">
                                        <i class="fa fa-photo" aria-hidden="true"></i>
                                    </div>
                                </div>
                                <p style="color: #8b8b8b;font-size: 12px">封面图是否展示以主题为准</p>
                            </div>
                        </div>
                        <input type="hidden" name="type" value="article">
                        <input value="#for(tag : article.tags)#(tag.id),#end" id="tagsValue" type="hidden">
                        <input value="#(article.categoryId)" id="categoryIdValue" type="hidden">
                    </div>
                </div>
            </div>
        </div>
    </form>
    <a id="open-right-panel-btn" title="展开右侧面板" href="javascript:;"><i class="layui-icon layui-icon-left"></i></a>
</div>
<script src="/static/public/libs/jquery/jquery-3.5.1.min.js"></script>
<script src="/static/public/libs/editormd/editormd.min.js"></script>
<script src="/static/public/libs/wangeditor/wangEditor.min.js"></script>
<script src="/static/public/libs/highlight/highlight.pack.js"></script>
<script src="/static/public/libs/layui-v2.5.6/layui/layui.js"></script>
<script src="/static/admin/static/component/pear/pear.js"></script>
<script src="/static/public/js/main.js?v=#(version)"></script>
<script src="/static/admin/static/js/editor.js?v=#(version)"></script>
<script src="/static/admin/pages/article/js/article_update.js?v=#(version)"></script>
</body>
</html>